OPC Studio User's Guide and Reference
OPC UA Data Type Systems
Client and Subscriber Development > Extensions > Integrated Extensions > OPC UA Complex Data Extension > OPC UA Data Type Systems
In This Topic

The data type system determines how the data types are described, and how the data is encoded. 

OPC Binary data type system

This data type system uses encoding name "Default Binary" (DefaultBinary in UABrowseNames Class).

The OPC Binary data type system is defined in the OPC UA specifications. It uses XML format to describe the data types, and the data is encoded in binary form. It is the most commonly used OPC UA data type system.

The OPC UA Complex Data extension can interpret data type dictionaries in the OPC Binary data type system, and encode and decode custom types accordingly. In addition, it contains an intrinsic knowledge of the standard data type dictionary for this data type system, as defined by the OPC Foundation. The standard data types are mapped as follows:

OPC UA standard type Data type (DataType Class) - raw Data type (DataType Class) - CLS compliant
http://opcfoundation.org/BinarySchema/:Bit primitive(System.Boolean) primitive(System.Boolean)
http://opcfoundation.org/BinarySchema/:Boolean primitive(System.Boolean) primitive(System.Boolean)
http://opcfoundation.org/BinarySchema/:SByte primitive(System.SByte) primitive(System.Int16)
http://opcfoundation.org/BinarySchema/:Byte primitive(System.Byte) primitive(System.Byte)
http://opcfoundation.org/BinarySchema/:Int16 primitive(System.Int16) primitive(System.Int16)
http://opcfoundation.org/BinarySchema/:UInt16 primitive(System.UInt16) primitive(System.Int32)
http://opcfoundation.org/BinarySchema/:Int32 primitive(System.Int32) primitive(System.Int32)
http://opcfoundation.org/BinarySchema/:UInt32 primitive(System.UInt32) primitive(System.Int64)
http://opcfoundation.org/BinarySchema/:Int64 primitive(System.Int64) primitive(System.Int64)
http://opcfoundation.org/BinarySchema/:UInt64 primitive(System.UInt64) primitive(System.Decimal)
http://opcfoundation.org/BinarySchema/:Float primitive(System.Single) primitive(System.Single)
http://opcfoundation.org/BinarySchema/:Double primitive(System.Double) primitive(System.Double)
http://opcfoundation.org/BinarySchema/:Char primitive(System.Char) primitive(System.Char)
http://opcfoundation.org/BinarySchema/:String primitive(System.String) primitive(System.String)
http://opcfoundation.org/BinarySchema/:CharArray primitive(System.String) primitive(System.String)
http://opcfoundation.org/BinarySchema/:WideChar primitive(System.Char) primitive(System.Char)
http://opcfoundation.org/BinarySchema/:WideString primitive(System.String) primitive(System.String)
http://opcfoundation.org/BinarySchema/:WideCharArray primitive(System.String) primitive(System.String)
http://opcfoundation.org/BinarySchema/:ByteString primitive(System.Byte[]) primitive(System.Byte[])
http://opcfoundation.org/BinarySchema/:DateTime primitive(System.DateTime) primitive(System.DateTime)
http://opcfoundation.org/BinarySchema/:Guid primitive(System.Guid) primitive(System.Guid)

When the OPC Binary data type system returns primitive data provided by the server to you, it makes sure that the type of the returned is CLS-compliant, and uses the data types listed under the "CLS compliant" column. For more information, see https://docs.microsoft.com/en-us/dotnet/standard/language-independence-and-language-independent-components#Types. Most types remain unchanged during this conversion, but values of the highlighted types undergo a conversion.

When sending primitive data types from the OPC Binary data type system to the server, the OPC UA Complex Data extension will attempt to convert the value provided by the caller to the .NET type listed in the above table (under the "raw" column). This means that you can freely write e.g. System.Int32 into http://opcfoundation.org/BinarySchema/:Byte, as long as the value in the required range (0-255 for System.Byte, in this example).

Standard types defined by the OPC Foundation in the specification have their corresponding DataType Class instances in the UAOpcBinaryStandardDataTypes Class. You can use various properties of this class to refer to standard OPC UA data types.

XML Schema data type system

This data type system uses encoding name "Default XML" (DefaultXml in UABrowseNames Class).

The OPC UA Complex Data extension currently does not support the XML Schema data type system.

 

See Also

Reference